<template>
  <u-modal
    v-model="showModal"
    :width="'560'"
    :show-confirm-button="false"
    :show-title="false">
    <view style="padding: 30rpx">
      <view
        style="font-weight: bold; padding: 10rpx 0 0 20rpx; text-align: center"
        >信息确认
      </view>
    </view>
    <view class="modal-content">
      <view class="section">
        <view class="title">
          <view class="title-text">收款银行卡信息</view>
          <image
            src="../../../static/title-icon.png"
            class="title-icon" />
        </view>
        <view class="content">
          <view
            class="item"
            v-for="(item, index) in submitObj"
            :key="index">
            <view class="item-name">{{ item.name }}：</view>
            <view class="item-desc">{{ item.value }}</view>
          </view>
        </view>
      </view>
    </view>
    <view
      style="
        display: flex;
        justify-content: space-around;
        padding-bottom: 20rpx;
      ">
      <u-button
        type="primary"
        shape="circle"
        plain
        throttle-time="0"
        style="width: 224rpx"
        @click="handleCancel"
        >取 消
      </u-button>
      <u-button
        type="primary"
        shape="circle"
        style="width: 224rpx"
        @click="handleConfirm">
        确定
      </u-button>
    </view>
  </u-modal>
</template>

<script>
export default {
  props: {
    showModal: {
      type: Boolean,
      default: false
    },
    submitObj: {
      type: Array,
      default: () => {
        return []
      }
    }
  },
  methods: {
    handleConfirm() {
      this.$emit('confirm')
    },
    handleCancel() {
      this.$emit('cancel')
    }
  }
}
</script>
<style scoped lang="scss">
.modal-content {
  padding: 0 30rpx;
  .title {
    display: flex;
    align-items: center;
    margin-bottom: 24rpx;
    &-text {
      font-size: 28rpx;
      font-weight: 500;
      color: #000000;
      line-height: 40rpx;
    }
    &-icon {
      width: 27rpx;
      height: 25rpx;
      margin-left: 4rpx;
    }
  }
  .section {
    margin-bottom: 32rpx;
  }
  .item {
    display: flex;
    font-size: 28rpx;
    color: #333333;
    line-height: 40rpx;
    &-name {
      white-space: nowrap;
    }
  }
}
</style>
